﻿@model BcdFileListViewModel
@{
    Layout = null;
    ViewBag.Title = "案卷资料查看-首页";
}
<style type="text/css">
    .ztree .span1 {
        color: #0a9c1d;
    }

    .ztree .span2 {
        color: #ff6a00;
    }
</style>
<script type="text/javascript">
    var jgzl_zlck_zTree;
    var jgzl_zlck_zTree_setting = {
        treeId: "jgzl_zlck_zTree",
        isSimpleData: true,              //数据是否采用简单 Array 格式，默认false
        treeNodeKey: "id",               //在isSimpleData格式下，当前节点id属性
        treeNodeParentKey: "pId",        //在isSimpleData格式下，当前节点的父节点id属性
        showLine: true,                  //是否显示节点间的连线
        checkable: false,                  //每个节点上是否显示 CheckBox
        async: true,
        asyncUrl: "/CompletionMaterials/FileCheck/AsyncFileDataJson",  //获取节点数据的URL地址
        asyncParam: ["proId", "id"],
        callback: {
            click: jgzl_zlck_zTree_click
        }
    }; $(function () {
        $.getJSON(
            "/CompletionMaterials/FileCheck/AsyncFileDataJson",
            function (data) {
                jgzl_zlck_zTree = $("#jgzl_zlck_zTree").zTree(jgzl_zlck_zTree_setting, data); 
                if (data.length > 0) {
                    $("#jgzl_ajml_list").loadUrl(
                        '/CompletionMaterials/FileCheck/Detail',
                        "tab_i=0&proId=" + data[0].proId + "&id=" + data[0].id,
                        function (message) {
                            $('#jgzl_ajml_list').parent().find("[layoutH]").layoutH();

                        });
                }
            });
    });
    //点击事件
    function jgzl_zlck_zTree_click(event, treeId, treeNode) {
        var tab_i = 0;
        if ($("#ul_filelist").length > 0) {
            var i = 0;
            $("#ul_filelist li").each(function () {
                if ($(this).attr("class") == "selected") {
                    tab_i = i;
                }
                i++;
            });
        }
        $("#jgzl_ajml_list").loadUrl('/CompletionMaterials/FileCheck/Detail', "tab_i=" + tab_i + "&proId=" + treeNode.proId + "&id=" + treeNode.id, function (message) {
            $('#jgzl_ajml_list').parent().find("[layoutH]").layoutH();
        });
    }
</script>


<div class="page" style="border-top: 1px solid #b8d0d6;" layouth="0">
    <div class="leftPanel" style="width: 300px;">
        <div class="pageContent" layouth="1">
            <ul id="jgzl_zlck_zTree" class="ztree"></ul>
        </div>
    </div>
    <div id="jgzl_ajml_list" class="rightPanel">
    </div>
</div>
